package com.syyo.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Auther: wangzhong
 * @Date: 2019/9/30 17:15
 * @Description: 状态枚举
 */
@AllArgsConstructor
@Getter
public enum ResultEnum {

    OK(20000, "成功"),
    FAIL(9999, "失败"),
    E_90000(90000, "参数不能为空"),
    E_90001(90001, "Token认证失败，原因：token无效或者过期！"),
    E_90003(90003, "您没有该功能的权限，请联系管理员！"),
    E_90004(90004, "文件导入失败，安全码过期！"),
    E_90005(90005, "验证码错误或者过期！"),
    E_90006(90006, "您没有该部门的权限，请联系管理员！"),
    E_90007(90007, "admin用户和角色不能删除"),
    E_90008(90008, "只有admin用户才能设置超级管理员角色"),
    E_90009(90009, "演示环境不能做增、改的操作！"),


    E_70001(70001, "该数据有被其他数据关联，不能删除！"),

    E_10001(10001, "新增sql执行错误！"),
    E_10002(10002, "删除sql执行错误！"),
    E_10003(10003, "编辑sql执行错误！"),

    E_80001(80001, "用户添加失败"),
    E_80002(80002, "用户删除失败"),
    E_80003(80003, "用户修改失败"),
    E_80004(80004, "用户已存在"),
    E_80005(80005, "用户不存在"),
    E_80006(80006, "用户账号或密码错误"),
    E_80007(80007, "用户被禁用"),
    E_80008(80008, "旧密码错误"),
    E_80009(80009, "新密码不能与旧密码相同"),

    E_80011(80011, "角色添加失败"),
    E_80012(80012, "角色删除失败"),
    E_80013(80013, "角色修改失败"),
    E_80014(80014, "角色已存在"),
    E_80015(80015, "角色id不存在"),
    E_80016(80016, "角色授权失败"),

    E_80021(80021, "菜单添加失败"),
    E_80022(80022, "菜单删除失败"),
    E_80023(80023, "菜单修改失败"),
    E_80024(80024, "菜单已存在"),
    E_80025(80025, "菜单id不存在"),
    E_80026(80027, "父级id不能是自己"),

    E_80031(80031, "部门添加失败"),
    E_80032(80032, "部门删除失败"),
    E_80033(80033, "部门修改失败"),
    E_80034(80034, "部门已存在"),
    E_80035(80035, "部门id不存在"),
    E_80036(80036, "上级部门不能是自己或者自己的子部门"),
    E_80037(80037, "该部门有子部门，不能删除"),

    E_80041(80041, "代码生成器配置添加失败"),
    E_80042(80042, "代码生成器配置删除失败"),
    E_80043(80043, "代码生成器配置修改失败"),
    E_80044(80044, "该表的代码生成器没有配置，请先配置"),
    E_80045(80045, "代码生成器配置，模块名配置错误，样例：syyo-common,项目名-模块名"),
    E_80046(80046, "此环境不允许生成代码，请选择预览或者下载查看！"),


    PLACEHOLDER(null, null);// 占位符,方便快速编写代码（无其他业务作用）

    private Integer code;
    private String message;


}
